(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
app(x, y) → helpa(0, plus(length(x), length(y)), x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))
Rewrite Strategy: FULL
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))
S is empty.
Rewrite Strategy: FULL
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
helpa,
plus,
length,
ge,
helpbThey will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb
(6) Obligation:
TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
x,
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
y,
ys),
zs) →
cons(
y,
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s
Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
The following defined symbols remain to be analysed:
plus, helpa, length, ge, helpb
They will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
plus(
gen_0':s6_0(
a),
gen_0':s6_0(
n8_0)) →
gen_0':s6_0(
+(
n8_0,
a)), rt ∈ Ω(1 + n8
0)
Induction Base:
plus(gen_0':s6_0(a), gen_0':s6_0(0)) →RΩ(1)
gen_0':s6_0(a)
Induction Step:
plus(gen_0':s6_0(a), gen_0':s6_0(+(n8_0, 1))) →RΩ(1)
s(plus(gen_0':s6_0(a), gen_0':s6_0(n8_0))) →IH
s(gen_0':s6_0(+(a, c9_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
x,
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
y,
ys),
zs) →
cons(
y,
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
The following defined symbols remain to be analysed:
length, helpa, ge, helpb
They will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
length(
gen_nil:cons5_0(
n825_0)) →
gen_0':s6_0(
n825_0), rt ∈ Ω(1 + n825
0)
Induction Base:
length(gen_nil:cons5_0(0)) →RΩ(1)
0'
Induction Step:
length(gen_nil:cons5_0(+(n825_0, 1))) →RΩ(1)
s(length(gen_nil:cons5_0(n825_0))) →IH
s(gen_0':s6_0(c826_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
x,
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
y,
ys),
zs) →
cons(
y,
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n825_0)) → gen_0':s6_0(n825_0), rt ∈ Ω(1 + n8250)
Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
The following defined symbols remain to be analysed:
ge, helpa, helpb
They will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb
(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
ge(
gen_0':s6_0(
n1099_0),
gen_0':s6_0(
n1099_0)) →
true, rt ∈ Ω(1 + n1099
0)
Induction Base:
ge(gen_0':s6_0(0), gen_0':s6_0(0)) →RΩ(1)
true
Induction Step:
ge(gen_0':s6_0(+(n1099_0, 1)), gen_0':s6_0(+(n1099_0, 1))) →RΩ(1)
ge(gen_0':s6_0(n1099_0), gen_0':s6_0(n1099_0)) →IH
true
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(14) Complex Obligation (BEST)
(15) Obligation:
TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
x,
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
y,
ys),
zs) →
cons(
y,
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n825_0)) → gen_0':s6_0(n825_0), rt ∈ Ω(1 + n8250)
ge(gen_0':s6_0(n1099_0), gen_0':s6_0(n1099_0)) → true, rt ∈ Ω(1 + n10990)
Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
The following defined symbols remain to be analysed:
helpb, helpa
They will be analysed ascendingly in the following order:
helpa = helpb
(16) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol helpb.
(17) Obligation:
TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
x,
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
y,
ys),
zs) →
cons(
y,
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n825_0)) → gen_0':s6_0(n825_0), rt ∈ Ω(1 + n8250)
ge(gen_0':s6_0(n1099_0), gen_0':s6_0(n1099_0)) → true, rt ∈ Ω(1 + n10990)
Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
The following defined symbols remain to be analysed:
helpa
They will be analysed ascendingly in the following order:
helpa = helpb
(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol helpa.
(19) Obligation:
TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
x,
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
y,
ys),
zs) →
cons(
y,
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n825_0)) → gen_0':s6_0(n825_0), rt ∈ Ω(1 + n8250)
ge(gen_0':s6_0(n1099_0), gen_0':s6_0(n1099_0)) → true, rt ∈ Ω(1 + n10990)
Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
No more defined symbols left to analyse.
(20) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
(21) BOUNDS(n^1, INF)
(22) Obligation:
TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
x,
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
y,
ys),
zs) →
cons(
y,
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n825_0)) → gen_0':s6_0(n825_0), rt ∈ Ω(1 + n8250)
ge(gen_0':s6_0(n1099_0), gen_0':s6_0(n1099_0)) → true, rt ∈ Ω(1 + n10990)
Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
No more defined symbols left to analyse.
(23) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
(24) BOUNDS(n^1, INF)
(25) Obligation:
TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
x,
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
y,
ys),
zs) →
cons(
y,
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
length(gen_nil:cons5_0(n825_0)) → gen_0':s6_0(n825_0), rt ∈ Ω(1 + n8250)
Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
No more defined symbols left to analyse.
(26) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
(27) BOUNDS(n^1, INF)
(28) Obligation:
TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
x,
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
y,
ys),
zs) →
cons(
y,
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: a → nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_a3_0 :: a
hole_true:false4_0 :: true:false
gen_nil:cons5_0 :: Nat → nil:cons
gen_0':s6_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
Generator Equations:
gen_nil:cons5_0(0) ⇔ nil
gen_nil:cons5_0(+(x, 1)) ⇔ cons(hole_a3_0, gen_nil:cons5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
No more defined symbols left to analyse.
(29) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s6_0(a), gen_0':s6_0(n8_0)) → gen_0':s6_0(+(n8_0, a)), rt ∈ Ω(1 + n80)
(30) BOUNDS(n^1, INF)